#include"heap.h"
void TEST1()
{
	HP hp;
	HeapInit(&hp);
    int a[] = {9,8,9,0,2,4,1,7,5 };
	int i = 0;
	int sz = sizeof(a) / sizeof(a[0]);
	for (i = 0; i < sz; i++)
	{
		HeapPush(&hp, a[i]);
		HeapPrint(&hp);
		printf("HeapSize = %d\n", HeapSize(&hp));
	}
	while (!HeapEmpty(&hp))
	{
		printf("%d ", HeapTop(&hp));
		HeapPop(&hp);
		printf("HeapSize = %d\n", HeapSize(&hp));
	}
	
	HeapDestory(&hp);
	//printf("%p\n", &hp);
	//printf("%p\n", hp.a);//NULL


}
int main()
{
	TEST1();
}